1. Field of the Invention
The present invention relates to a moire fringe eliminating apparatus and a method for eliminating moire fringes which occur on an image when displaying the image on a display apparatus, or which occur on a printed image when printing the image by a printer, after scanning a manuscript with halftone dots thereon.
2. Description of the Related Art
In general, moire fringes occur on an image when displaying the image on the display apparatus, or on a printed image when printing the image by the printer, after scanning the manuscript with halftone dots thereon.
Accordingly, it is necessary to eliminate the moire fringes in order to obtain high quality image on the display apparatus, or high quality printed image from the printer.
Conventionally, in order to eliminate the moire fringes, a mask having a predetermined square size (for example, 3xc3x973 square) is provided on the scanned image, and an average value of density of the image dotted by halftone dots is calculated for the square size. Further, a space filtering process is directly performed on the image in order to obscure the moire fringes on the image.
In this case, however, the space filtering process is performed not only on the image having the moire fringes, but also on an normal image having no moire fringes. As a result, although the moire fringes can be eliminated, the normal image, having good quality, becomes worse in the conventional art.
The object of the invention is to provide a moire fringe eliminating apparatus which can eliminate sufficiently the moire fringes but can maintain good quality for the normal image.
Another object of the present invention is to provide a method for eliminating moire fringes which can eliminate clearly from the image, and can maintain the good quality of the normal image.
In accordance with a first aspect of the present invention, there is provided a moire fringe eliminating apparatus including a halftone dot recognizing unit for receiving image data and recognizing halftone dots on the image data and a moire fringe eliminating unit for eliminating moire fringes on the halftone dots, wherein the moire fringe eliminating unit comprises;
a halftone dot feature extracting unit for extracting features of the halftone dots;
a re-calculation unit for obtaining a re-calculation deciding value which represents a ratio between a total number of the halftone dots in a neighboring area and the number of the halftone dots having a similarity of feature being smaller than a predetermined threshold value in the neighboring area;
a re-calculation deciding unit for deciding whether the threshold value should be changed in order to decide necessity of change of the number of dots based on the re-calculation deciding value; and
a halftone dot shape changing unit for obtaining an amount of change of the number of dots to be increased or decreased for a target halftone dot, based on an amount of feature of the halftone dots which are output when the threshold value is not changed in the neighboring area, an amount of the feature of the target halftone dot, and the number of dots of the target halftone dot.
In a preferable embodiment, the amount of change of the number of dots to be increased or decreased is obtained from at least one of the following values, i.e., the number of the halftone dots having similar features existing in the neighboring area of the target halftone dot, a dimension of slippage between a center of gravity of the target halftone dot and the center of the gravity of the neighboring dots, and a dimension of slippage between a center of a circumscribed square of the target halftone dot and the center of the circumscribed square of the neighboring halftone dots.
In another preferable embodiment, the change of pixels of the target halftone dot is changed based on the amount of change of dots to be increased or decreased for the target halftone dot.
In accordance with a second aspect of the present invention, there is provided a method for eliminating the moire fringes used in a moire fringe eliminating apparatus, including the steps of:
setting initial values of various parameters used in a moire fringe eliminating process;
extracting features of all halftone dots which can be recognized;
calculating a similarity between a target halftone dot and features of other halftone dots;
calculating values to be added for each feature of the halftone dots in which the similarity is smaller than a predetermined threshold value;
calculating values used for determining necessity of the re-calculation based on the number of the halftone dots added in the halftone feature adding step;
changing various parameters used for eliminating the moire fringes in accordance with the values in the re-calculation;
calculating an amount of change of halftone dot pixels in order to obtain the amount of change of the target halftone dot, by using an average value of added values obtained in the halftone dot feature adding step, and the feature value of the target halftone dot;
deciding the necessity of change of the target halftone dot pixels based on the amount of change of the target halftone dot; and
changing the pixel of the target halftone dot based on the amount of the change.
In a preferable embodiment, the step for changing various parameters used for eliminating the moire fringes in accordance with the re-calculation value, is executed based on at least one of the following three parameters, i.e., the number of halftone dots having similar feature and existing in the neighboring area of the target halftone dot; a center of a gravity of the neighboring halftone dots; and a dimension of slippage of a center of a circumscribed square.
In another preferable embodiment, in the step for changing the pixel of the target halftone dot based on the amount of change and the change of the halftone dot is executed based on correction of slippage for either the center of the gravity in the neighboring halftone dots, or the center of the circumscribed square.